A development tool such as, for example, VISUAL STUDIO™ from Microsoft Corp. of Redmond, Wash., enables development of a wide range of computing applications. Such applications may include, for example, web applications, extensible markup language (XML) applications, and traditional client applications. A development tool may assist developers in several phases of the development process. Such phases may include designing an application, debugging test versions of the application, and distributing a finished version of the application. The development process often includes several builds in which test versions of an application may be debugged before the finished version of the application is ready for distribution.
If an application is data-driven, then the application may have one or more associated databases. Such databases may be used to categorize, organize, and maintain data which are useful to an application. The development process for an associated database often parallels the development process for an application. The associated databases are typically debugged along with test versions of the application. Furthermore, finished versions of the associated databases may be distributed along with finished versions of the application.
Related to the development of applications and associated databases is the creation of stored procedures. A stored procedure is a collection of one or more statements that generally retrieves or modifies data in a database. A stored procedure is precompiled and stored at a database for later use. A database may contain a set of associated stored procedures which it treats as a unit. A stored procedure may define complex business rules, control data modification, limit access to data through security permissions, and/or provide transactional integrity. A stored procedure is typically written in a query language such as, for example, a structured query language (SQL) or a language supported by the database engine.
A trigger is a unique type of stored procedure that runs when data in a specified table is modified using one or more data modification operations. Such modification operations may be updates, deletions, or insertions. A trigger may query or edit table(s) and may include complex SQL statements. A trigger is primarily useful for maintaining relational integrity in the database or enforcing complex business rules and requirements. For example, a trigger may determine, based on a customer's current account status, whether to allow a new order to be inserted into a table.
A development tool may enable the development of data-driven applications for a wide range of computers. For example, a development tool may enable development of applications for a traditional computer such as a desktop or a laptop computer. A development tool may also enable development of applications for a device such as, for example, personal data assistant (PDA), a mobile phone, or a set top box (STB). As used herein, the term “device” is intended to encompass any compact computing device or emulated compact computing device. As a result of their compact size, such devices may function with limited resources. Due to such limited resources, the development of device applications may involve several differences from the development of traditional applications.
One such difference is related to debugging of test versions of applications. While traditional applications are typically both designed and debugged on a traditional computer, device applications are typically designed on a traditional computer and then deployed to a device for debugging. Device applications are typically designed on a traditional computer to take advantage of added resources available on the traditional computer. Device applications are typically debugged on a device so that they may be run and tested in a limited resource operating environment for which they are designed. Deploying a device application to a device involves several challenges which are not present when an application is deployed to a traditional computer.
One such challenge involves efficiently deploying an application and associated databases to a device. In one conventional development method, an associated database is created using a script when an application is first run. In another conventional development method, a database is manually created on a target device, then copied to a development computer for storage, and then manually copied back to the target device to be run and tested. Such conventional methods are limited in their effectiveness. Due to the limited resources available on a device, however, a database cannot be created and managed on a device as efficiently as on a development computer. Additionally, copying a database to and from a target device is often a time-consuming process. Thus, such conventional methods are cumbersome and make it difficult to maintain the database schema and content. The disadvantages of such conventional methods are compounded when development of a device application includes several debug builds, thereby requiring a database to be redeployed to a device multiple times. Thus, there is a need in the art for systems and methods for efficiently deploying a device database to a device.
Another challenge of deploying a device application to a device involves efficiently deploying stored procedures and triggers within a device database. Conventional development tools are limited with respect to associating stored procedures and triggers with a device database. In one conventional method, stored procedures and triggers may be associated with a device database using manual commands. Such manual association is also cumbersome and requires knowledge of the programmatic methods to associate the stored procedure and/or trigger with the database. Thus there is a need in the art for a mechanism for efficiently associating stored procedures and triggers with a device database in a development environment. It is desired that such systems and methods enable stored procedures and triggers to be automatically registered with a device database and efficiently deployed to a device in conjunction with the device database.